#include <REGX52.H>
#include<INTRINS.H>

void Delay1ms( int xms)		//@12.000MHz
{
	unsigned char i, j;
	while(xms)
	{
		i = 2;
		j = 239;
		do
		{
			while (--j);
		}
		while (--i);
		xms=xms-1;
	}
}
	


void main()
{
	while(1)
	{
		P2=0x7e;//0111 1110
		Delay1ms(1000);
		P2=0xbd;//1011 1101
		Delay1ms(500);
		P2=0xdb;//1101 1011
		Delay1ms(100);
		P2=0xe7;//1110 0111
		Delay1ms(200);
		/*
		P2=0xf7;//1111 0111
		Delay500ms();
		P2=0xfb;//1111 1011
		Delay500ms();
		P2=0xfd;//1111 1101
		Delay500ms();
		P2=0xfe;//1111 1110
		Delay500ms();
		P2=0xff;//1111 1111
		Delay500ms();*/
		//Delay1ms(500)
	}
}